package com.duduli.li.control;

import javax.annotation.Resource;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.duduli.li.DaoImpl;

@Controller
public class ProductController {
	private final static Logger logger = LoggerFactory.getLogger(ProductController.class); 
	@Resource
	private DaoImpl di;
	@RequestMapping("/")
	public String product(Model model) {
		logger.info("start ----");
		model.addAttribute("products",di.getProduct());
		return "product.html";
	}

}
